//
//  YZMSuggestionModel.m
//  YZMicroStock
//
//  Created by wangminhong on 16/4/7.
//  Copyright © 2016年 cqjr. All rights reserved.
//

#import "YZMSuggestionModel.h"
#import "Mantle+Utils.h"

@implementation YZMSuggestionModel

+ (NSDictionary *)JSONKeyPathsByPropertyKey {
    return @{
             @"message": @"msg",
             @"messageTime":@"msgTime",
             @"reply":@"reply",
             @"replyTime":@"replyTime",
             };
}

- (instancetype)initWithDictionary:(NSDictionary *)dictionaryValue error:(NSError **)error {
    
    self = [super initWithDictionary:dictionaryValue error:error];
    if (self == nil) return nil;
    
    if (self.reply.length > 0) {
        
        self.replyFlag = YES;
    }
    
    return self;
}

- (void)setNilValueForKey:(NSString *)key
{
    
}

+ (NSValueTransformer *)messageTimeJSONTransformer
{
    return [NSValueTransformer valueTransformerForName: MTLDoubleDateTransformerName];
}

+ (NSValueTransformer *)replyTimeJSONTransformer
{
    return [NSValueTransformer valueTransformerForName: MTLDoubleDateTransformerName];
}

@end
